import React from "react";
import {Link} from "react-router";
import "../css/style.scss";
export default class App extends React.Component {
    render() {
        return (
            <div className="app">
                <Header/>
                <div className="container">
                    {this.props.children}
                </div>
            </div>
        )
    }
}

class Header extends React.Component {
    render() {
        return (
            <div className="navbar navbar-inverse navbar-fixed-top">
                <div className="container">
                    <div className="navbar-header">
                        <button className="navbar-toggle collapsed" type="button" data-toggle="collapse"
                                data-target=".navbar-collapse">
                            <span className="sr-only">Toggle navigation</span>
                            <span className="icon-bar"/>
                            <span className="icon-bar"/>
                            <span className="icon-bar"/>
                        </button>
                        <a className="navbar-brand hidden-sm" href="/admin">Dashboard</a>
                    </div>

                    <div className="navbar-collapse collapse" role="navigation">
                        <ul className="nav navbar-nav">
                            <li><Link to="/user">用户</Link></li>
                            <li><Link to="/news">文章</Link></li>
                            <li><Link to="/prize">奖品</Link></li>
                            <li><Link to="/prize/wins">中奖列表</Link></li>
                        </ul>
                        <ul className="nav navbar-nav navbar-right">
                            <li><a href="/admin/default/logout">退出登录</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        )
    }
}